package com.lening.provider.controller.PropertyNotice;

import com.lening.common.base.BaseController;
import com.lening.provider.dto.PropertyNotice.NotificationTypesDTO;
import com.lening.provider.po.PropertyNotice.NotificationTypesPO;
import com.lening.provider.service.PropertyNotice.NotificationTypesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 刘政华
 * @datetime 2024/6/5 14:03
 * @description 类对象
 */
@Slf4j
@RestController
@RequestMapping("notificationTypess")
public class NotificationTypesController extends BaseController<NotificationTypesPO, NotificationTypesDTO, NotificationTypesService> {

    @Resource
    private NotificationTypesService notificationTypesService;

    @GetMapping("dropdown")
    public List<NotificationTypesDTO> getNewList(@RequestParam(name = "noticeTypeName", required = false) String noticeTypeName){
        List<NotificationTypesDTO> list = notificationTypesService.getByName(noticeTypeName);
        return list;
    }

}
